#pragma once

#ifndef ABSTRACT_FILE_SYSTEM_SCANNER
#define ABSTRACT_FILE_SYSTEM_SCANNER

/*! \file AbstractFileSystemScanner.h
	\brief Header file for AbstractFileSystemScanner class.
	
	Details.
*/

#include <string>
#include <vector>
#include "boost/shared_ptr.hpp"

#include "AbstractFileFilter.h"
#include "FileInfo.h"

namespace analyzer {

	//! This class is used for represents a file system scanner.
	class AbstractFileSystemScanner
	{
	public:	
		/*! \fn AbstractFileSystemScanner(boost::shared_ptr<AbstractFileFilter> fileFilter)
			\brief Constructor of class AbstractFileSystemScanner
		*/
		AbstractFileSystemScanner(boost::shared_ptr<AbstractFileFilter> fileFilter);
		/*! \fn virtual ~AbstractFileSystemScanner(void)
			\brief Destructor of class AbstractFileSystemScanner.
		*/
		virtual ~AbstractFileSystemScanner(void);

		/*! \fn boost::shared_ptr<AbstractFileFilter> getFileFilter(void) const
			\brief Returns the file filter appended to object.
			\return File filter appended to object.
		*/
		boost::shared_ptr<AbstractFileFilter> getFileFilter(void) const;
		
		/*! \fn void setFileFilter(boost::shared_ptr<AbstractFileFilter> filter)
			\brief Sets the file filter to object.
			\param filter Pointer to file filter which is to be set.
		*/
		void setFileFilter(boost::shared_ptr<AbstractFileFilter> filter);

		/*! \fn virtual std::vector<FileInfo> filterFiles(std::string directory, bool includeSubDirectories) =0
			\brief Returns all the file (vector of FileInfo object) from directory matched witch file filter.
			\param directory String defining path to work directory.
			\param includeSubDirectories True - method also search subdirectories. False - method search only current directory.
			\return Vector of FileInfo objects.
		*/
		virtual std::vector<FileInfo> filterFiles(std::string directory, bool includeSubDirectories) =0;

	private:
		boost::shared_ptr<AbstractFileFilter> fileFilter;
	};

}

#endif // ABSTRACT_FILE_SYSTEM_SCANNER
